'use strict';

angular.module('app').controller('fullScore', ['$scope', '$window', '$http', '$rootScope', '$cookies',
    function($scope, $window, $http, $rootScope, $cookies) {
        var isIE = !!navigator.userAgent.match(/MSIE/i);
        isIE && angular.element($window.document.body).addClass('ie');
        isSmartDevice($window) && angular.element($window.document.body).addClass('smart');

        // 设置颜色逗小粒管理后台
        $scope.app = {
            name: '',
            settings: {
                themeID: 8,
                navbarHeaderColor: 'bg-info dker',
                navbarCollapseColor: 'bg-info dker',
                asideColor: 'bg-dark dker b-r',
                headerFixed: true,
                asideFixed: true,
                asideFolded: true,
                asideDock: true,
                container: true
            }
        }

        function isSmartDevice($window) {
            var ua = $window['navigator']['userAgent'] || $window['navigator']['vendor'] || $window['opera'];
            // 检查机型
            return (/iPhone|iPod|iPad|Silk|Android|BlackBerry|Opera Mini|IEMobile/).test(ua);
        }
    }
]);